﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ERP.RBAC.Dto;
using Volo.Abp.Application.Services;
using static Volo.Abp.Identity.IdentityPermissions;

namespace ERP.RBAC
{
    public interface IRoleServicers: IApplicationService
    {
        /// <summary>
        /// 添加角色
        /// </summary>
        /// <returns></returns>
        Task<int> AddRole(Roles roles);
        /// <summary>
        /// 显示所有角色
        /// </summary>
        /// <returns></returns>
        Task<List<Roles>> QueryRole();


        /// <summary>
        /// 删除角色信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DelRole(int id);

        /// <summary>
        /// 回显角色信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<RolePerDto> FullRole(int id);

        /// <summary>
        /// 获取用户角色的方法
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<List<RolePerDto>> GetUserRoles(int userId);
        Task<int> UpRole(Roles roles);
    }
}
